<p>
  profile-editor works!
</p>

<form [formGroup]="profileForm">
  
  <label>
    First Name:
    <input type="text" formControlName="firstName" #a >
  </label>
  <p>{{a.className}}</p>
  <div *ngIf="name.invalid && (name.dirty || name.touched)"
    class="alert alert-danger">
    <div *ngIf="name.errors.required">
      Name is required.
    </div>
    <div *ngIf="name.errors.minlength">
      Name must be at least 4 characters long.
    </div>
    <div *ngIf="name.errors.forbiddenName">
      Name cannot be Bob.
    </div>
  </div>

  <label>
    Last Name:
    <input type="text" formControlName="lastName">
  </label>

  <div formGroupName="address">
    <h3>地址</h3>
    <label>
      Street:
      <input type="text" formControlName="street">
    </label>

  </div>

  <input type="submit" value="提交">

</form>

